golang/xenlight: implement keyed union Go to C marshaling
authorNick Rosbrook <rosbrookn@gmail.com>
Sat, 4 Jan 2020 21:00:52 +0000 (16:00 -0500)
committerGeorge Dunlap <george.dunlap@citrix.com>
Thu, 16 Jan 2020 18:18:02 +0000 (18:18 +0000)
commitdda31ce9521c3b6a7750076f79427be77dea9b5b
tree8e87985249080d80ba7c9e482ecf1a27a43c27bf
parent273971c9408bf608605697afd2feb8cdc47c4a35
golang/xenlight: implement keyed union Go to C marshaling

Since the C union cannot be directly populated, populate the fields of the
corresponding C struct defined in the cgo preamble, and then copy that
struct as bytes into the byte slice that Go uses as the union.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/gengotypes.py
tools/golang/xenlight/helpers.gen.go